﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EMC.EQUI.Core
{
    /// <summary>
    /// 堆垛机任务
    /// </summary>
    public class StackerTask
    {
        /// <summary>
        /// 任务编号
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "任务编号", IndexGroupNameList = new string[] { "index_code" })]
        public string Code { get; set; }

        /// <summary>
        /// 仓库编号
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "仓库编号", IndexGroupNameList = new string[] { "index_warehousecode" })]
        public string WarehouseCode { get; set; }

        /// <summary>
        /// 载具编号-料箱号
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "载具编号", IndexGroupNameList = new string[] { "index_container" })]
        public string Container { get; set; }

        /// <summary>
        /// 任务类型
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "任务类型", IndexGroupNameList = new string[] { "index_type" })]
        public StockerTaskType? StockerTaskType { get; set; }

        /// <summary>
        /// 任务状态
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "任务状态", IndexGroupNameList = new string[] { "index_status" })]
        public StockerTaskStatus StockerTaskStatus { get; set; } = StockerTaskStatus.暂存;


        /// <summary>
        /// 优先级-越大表示越先执行
        /// </summary>
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "优先级")]
        public int Priority { get; set; } = 0;

        /// <summary>
        /// 起点
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "起点")]
        public string StartTaxi { get; set; }

        /// <summary>
        /// 结点
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "结点")]
        public string EndTaxi { get; set; }

        /// <summary>
        /// 下发时间-下发到堆垛机的时间
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "下发时间")]
        public DateTime? ImplementTime { get; set; }

        /// <summary>
        /// 完成时间
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "完成时间")]
        public DateTime? FinishTime { get; set; }

        /// <summary>
        /// 巷道编号
        /// </summary>
        [SugarColumn( ColumnDescription = "巷道编号")]
        public int? TunnelNum { get; set; }
        /// <summary>
        /// 接驳口
        /// </summary>
        [SugarColumn(ColumnDescription = "接驳口")]
        public string? TurnTaxi { get; set; }

        /// <summary>
        /// 车辆
        /// </summary>
        [SugarColumn(ColumnDescription = "车辆")]
        public string? Vehicle { get; set; }
    }
}
